package chapte09;
class Student06{
    String name;
    int age;
    static String school = "A大学";
    public Student06(String name,int age){
        this.name = name;
        this.age = age;
    }
    public void info(){
        System.out.println("姓名:"+this.name+",年龄:"+this.age+",学校;"+school);
    }
    public String getName(){
        return name;
    }
    public void setName(String name){
        this.name =name;
    }
    public int getAge(){
        return age;
    }
    public void setAge(int age){
        this.age = age;
    }
    public static String getSchool(){
        return school;
    }

    public static void setSchool(String school) {
        Student06.school = school;
    }
}
public class example15 {
    public static void main(String[] args) {
        Student06 stu1 = new Student06("张三",18);
        Student06 stu2 = new Student06("李四",19);
        Student06 stu3 = new Student06("王五",20);
        stu1.setAge(20);
        stu2.setName("小明");
        Student06.setSchool("B大学");
        stu1.info();
        stu2.info();
        stu3.info();
    }
}
